(function(){

var applicationRequest = {
	addCityUser:function(request,_callback){
	           var url = "/addCityUser/"+request  
	           $.getJSON(url,function(data){
	        	if(_callback != null){
	  		    _callback(data);
	      	}
	  });
	},
	addPlaceToCity:function(request,_callback){
		  var url = "/addPlaceToCity/"
		  var requestData ={requestData:request}
			$.post(url,requestData,function(data){
				_callback(data);
			}, "json");

	},
	removeCityUser:function(){},
	removePlaceUser:function(){},
	requestUserId:"",
	currentUserRequest:function(userId,userCity,userCityType){
		this.userId = userId;
		this.userCity = userCity;
		this.userCityType = userCityType;
		this.getJSON = function(){
			var request = {
				userId:userId,
				userCity:userCity,
				userCityType:userCityType
			}
		   return request;	
		}
	},
	addPlaceCityId:'',
	showUserPlaceOfCity:function(cityId, _callback){
		var url = "/getPlaceOfCity/"+cityId;
		$.getJSON(url,function(data){
			if(_callback != null){
				_callBack(data);
			}
		})
		
	}

	
}	


if(!window.$appRequest){
	window.$appRequest = applicationRequest;
}
})();
